home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef __MIMAGES_H
- #define __MIMAGES_H
-
- #define REPEAT_SIGN 255 // In compressing, this char is not used.
- #define NO_CHANGE NULL
-
- #define MIMAGE_ID 0x010E
-
- #define NORMAL_PUT 1
- #define AND_PUT 2
- #define OR_PUT 3
- #define XOR_PUT 4
- #define SEETH_PUT 5
-
- #define T_COLOR 0x00
-
- class MImage : public cArray {
- protected:
- WORD CompSize;
- WORD Length;
- WORD Width;
- WORD PutType;
- protected:
- virtual inline void MoveMasked (WAY Way, WORD Offset, PTR Where, WORD HowMany, SIZE OfHowMuch, WORD Skip = 0, WORD Ignore = 0);
- public:
- MImage (WORD len = 1, WORD wid = 1, BYTE *nmem = NULL);
- MImage (const MImage& image);
- virtual void Put (int offx, int offy, BOOL mask = FALSE);
- void Get (int offx, int offy);
- virtual void Compress ();
- virtual void Decompress ();
- virtual void LoadDirect (int fp);
- void SetPut (int NewPut);
- inline WORD GetLength (void) const {return (Length);};
- inline WORD GetWidth (void) const {return (Width);};
- inline DWORD GetSize (void) const {return (size);};
- inline WORD GetCompSize (void) const {return (CompSize);};
- virtual void Blend (ADR with, ADR into);
- virtual void Redefine (WORD nlen = 1, WORD nwid = 1, BYTE *nmem = NULL);
- virtual void Redefine (const MImage& NewImage);
- virtual void SaveDirect (int fp);
- virtual inline BYTE * GetBitmap (void) const;
- virtual inline operator BYTE*() const;
- BOOL IsCompressed (void) const;
- virtual inline classType isA (void) {return (MIMAGE_ID);};
- friend MMob;
- ~MImage (void);
- };
- typedef MImage IMAGE;
-
- #endif
-